package com.ruoyi.drone.domain.dto;

import jakarta.validation.constraints.*;

/**
 * 无人机系统登录DTO
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
public class DroneLoginDTO {

    /** 手机号码 */
    @NotBlank(message = "手机号码不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phone;

    /** 密码 */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20位之间")
    private String password;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "DroneLoginDTO{" +
                "phone='" + phone + '\'' +
                ", password='[PROTECTED]'" +
                '}';
    }
}
